import App from '../App'

const login = r => require.ensure([], () => r(require('../page/login/login')), 'login');
const wxlogin = r => require.ensure([], () => r(require('../page/login/wxlogin')), 'wxlogin');
const forget = r => require.ensure([], () => r(require('../page/forget/forget')), 'forget');
const regist = r => require.ensure([], () => r(require('../page/regist/regist')), 'regist');
const protocol = r => require.ensure([], () => r(require('../page/protocol/protocol')), 'protocol');
//首页
const index = r => require.ensure([], () => r(require('../page/index/index')), 'index');
const recruitlist = r => require.ensure([], () => r(require('../page/index/work/recruitlist')), 'recruitlist');
const salary = r => require.ensure([], () => r(require('../page/index/salary/salary')), 'salary');
const entry = r => require.ensure([], () => r(require('../page/index/entry/entry')), 'entry');
const mine = r => require.ensure([], () => r(require('../page/index/mine/mine')), 'mine');

//个人资料
const material = r => require.ensure([], () => r(require('../page/material/material')), 'material');
const award = r => require.ensure([], () => r(require('../page/invite/award')), 'award');
const awarddetail = r => require.ensure([], () => r(require('../page/invite/awarddetail')), 'awarddetail');
const service = r => require.ensure([], () => r(require('../page/service/service')), 'service');
const problem = r => require.ensure([], () => r(require('../page/service/problem')), 'problem');
const system = r => require.ensure([], () => r(require('../page/message/system')), 'system');
const other = r => require.ensure([], () => r(require('../page/message/other')), 'other');
const infodetail = r => require.ensure([], () => r(require('../page/message/infodetail')), 'infodetail');
const reward = r => require.ensure([], () => r(require('../page/invite/reward')), 'reward');
const rewardentry = r => require.ensure([], () => r(require('../page/invite/rewardentry')), 'rewardentry');
const rewardregist = r => require.ensure([], () => r(require('../page/invite/rewardregist')), 'rewardregist');

//账号管理
const account = r => require.ensure([], () => r(require('../page/modify/account')), 'account');
const bucket = r => require.ensure([], () => r(require('../page/modify/bucket')), 'bucket');
const modifypwd = r => require.ensure([], () => r(require('../page/modify/modifypwd')), 'modifypwd');
const modifyPhone = r => require.ensure([], () => r(require('../page/modify/modifyPhone')), 'modifyPhone');
const secret = r => require.ensure([], () => r(require('../page/modify/secret')), 'secret');

//签到
const sign = r => require.ensure([], () => r(require('../page/sign/sign')), 'sign');
//活动
const activitypage = r => require.ensure([], () => r(require('../page/activity/activitypage')), 'activitypage');
const activity = r => require.ensure([], () => r(require('../page/activity/activity')), 'activity');
//日日薪
const daymoney = r => require.ensure([], () => r(require('../page/daymoney/daymoney')), 'daymoney');
const staffmanage = r => require.ensure([], () => r(require('../page/daymoney/staffmanage')), 'staffmanage');
const staffrecord = r => require.ensure([], () => r(require('../page/daymoney/staffrecord')), 'staffrecord');
const residentcheck = r => require.ensure([], () => r(require('../page/daymoney/residentcheck')), 'residentcheck');
const refuse = r => require.ensure([], () => r(require('../page/daymoney/refuse')), 'refuse');
const attendance = r => require.ensure([], () => r(require('../page/daymoney/attendance')), 'attendance');
const eligibleapply = r => require.ensure([], () => r(require('../page/daymoney/eligibleapply')), 'eligibleapply');
const eligiblesucess = r => require.ensure([], () => r(require('../page/daymoney/eligiblesucess')), 'eligiblesucess');
//借支
const lend = r => require.ensure([], () => r(require('../page/lend/lend')), 'lend');
const lendDetail = r => require.ensure([], () => r(require('../page/lend/lendDetail')), 'lendDetail');
//企业点评
const company = r => require.ensure([], () => r(require('../page/mechanism/company')), 'company');
const citylist = r => require.ensure([], () => r(require('../page/mechanism/citylist')), 'citylist');
const citytreelist = r => require.ensure([], () => r(require('../page/mechanism/citytreelist')), 'citytreelist');
const mechanism = r => require.ensure([], () => r(require('../page/mechanism/mechanism')), 'mechanism');
const payroll = r => require.ensure([], () => r(require('../page/mechanism/payroll')), 'payroll');
const remark = r => require.ensure([], () => r(require('../page/mechanism/remark')), 'remark');
//工资明细
const wage = r => require.ensure([], () => r(require('../page/salary/wage')), 'wage');
const wageDetail = r => require.ensure([], () => r(require('../page/salary/wageDetail')), 'wageDetail');

//工资卡管理
const paycard_manage = r => require.ensure([], () => r(require('../page/paycard/paycard_manage')), 'paycard_manage');
const addcard = r => require.ensure([], () => r(require('../page/paycard/addcard')), 'addcard');
const bindcard = r => require.ensure([], () => r(require('../page/paycard/bindcard')), 'bindcard');
const bindcard_idtywrite = r => require.ensure([], () => r(require('../page/paycard/bindcard_idtywrite')), 'bindcard_idtywrite');
const bindcard_cardscan = r => require.ensure([], () => r(require('../page/paycard/bindcard_cardscan')), 'bindcard_cardscan');
const bindcard_cardwrite = r => require.ensure([], () => r(require('../page/paycard/bindcard_cardwrite')), 'bindcard_cardwrite');
const bandcrad_setpwd = r => require.ensure([], () => r(require('../page/paycard/bandcard_setpwd')), 'bandcrad_setpwd');
const changecard = r => require.ensure([], () => r(require('../page/paycard/changecard')), 'changecard');
const changecard_cardscan = r => require.ensure([], () => r(require('../page/paycard/changecard_cardscan')), 'changecard_cardscan');
const changecard_cardwrite = r => require.ensure([], () => r(require('../page/paycard/changecard_cardwrite')), 'changecard_cardwrite');
const success = r => require.ensure([], () => r(require('../page/paycard/success')), 'success');
const change_success = r => require.ensure([], () => r(require('../page/paycard/change_success')), 'change_success');
const identityauth = r => require.ensure([], () => r(require('../page/paycard/identityauth')), 'identityauth');
const identywrite_asce = r => require.ensure([], () => r(require('../page/paycard/identywrite_asce')), 'identywrite_asce');
const cardscan_asce = r => require.ensure([], () => r(require('../page/paycard/cardscan_asce')), 'cardscan_asce')
const cardwrite_asce = r => require.ensure([], () => r(require('../page/paycard/cardwrite_asce')), 'cardwrite_asce');
const setpwd_asce = r => require.ensure([], () => r(require('../page/paycard/setpwd_asce')), 'setpwd_asce');
const dimission = r => require.ensure([], () => r(require('../page/dimission/dimission')), 'dimission');
const deposit = r => require.ensure([], () => r(require('../page/withdraw/deposit')), 'deposit');
const deposit_suc = r => require.ensure([], () => r(require('../page/withdraw/deposit_suc')), 'deposit_suc');
const authcode = r => require.ensure([], () => r(require('../page/withdraw/authcode')), 'authcode');
const withdraw_pwd = r => require.ensure([], () => r(require('../page/withdraw/withdraw_pwd')), 'withdraw_pwd');
const withdraw_pwdupdate = r => require.ensure([], () => r(require('../page/withdraw/withdraw_pwdupdate')), 'withdraw_pwdupdate');
const withdraw_pwdupsucc = r => require.ensure([], () => r(require('../page/withdraw/withdraw_pwdupsucc')), 'withdraw_pwdupsucc');
const invite = r => require.ensure([], () => r(require('../page/invite/invite')), 'invite');

//账单
const bill = r => require.ensure([], () => r(require('../page/bill/bill')), 'bill');
const otherdetail = r => require.ensure([], () => r(require('../page/bill/otherdetail')), 'otherdetail');
const billdetail = r => require.ensure([], () => r(require('../page/bill/billdetail')), 'billdetail');

//招工
const interview = r => require.ensure([], () => r(require('../page/recruit/interview')), 'interview');
const city = r => require.ensure([], () => r(require('../page/index/work/citylist')), 'city');
const recruitdetail = r => require.ensure([], () => r(require('../page/recruit/recruitdetail')), 'recruitdetail');
const referral = r => require.ensure([], () => r(require('../page/recruit/referral/referral')), 'referral');
const searchwork = r => require.ensure([], () => r(require('../page/recruit/searchwork')), 'searchwork');
const citytree = r => require.ensure([], () => r(require('../page/index/work/citytree')), 'citytree');

const error = r => require.ensure([], () => r(require('../page/error')), 'error');

//幸运积分
const lottery = r => require.ensure([], () => r(require('../page/activity/lucky/lottery')), 'lottery');
const luckyball = r => require.ensure([], () => r(require('../page/activity/lucky/luckyball')), 'luckyball');
const luckyballdraw = r => require.ensure([], () => r(require('../page/activity/lucky/luckyballdraw')), 'luckyballdraw');
const luckyballlottery = r => require.ensure([], () => r(require('../page/activity/lucky/luckyballlottery')), 'luckyballlottery');
const luckyballuser = r => require.ensure([], () => r(require('../page/activity/lucky/luckyballuser')), 'luckyballuser');
const luckywheel = r => require.ensure([], () => r(require('../page/activity/lucky/luckywheel')), 'luckywheel');

//积分说明
const scoreexplain = r => require.ensure([], () => r(require('../page/index/explain/scoreexplain')), 'scoreexplain');
const sufferexplain = r => require.ensure([], () => r(require('../page/index/explain/sufferexplain')), 'sufferexplain');

//入职评价
const entryevaluate = r => require.ensure([], () => r(require('../page/evaluate/entryevaluate')), 'entryevaluate');
const entryevaluateedit = r => require.ensure([], () => r(require('../page/evaluate/entryevaluateedit')), 'entryevaluateedit');
const chaseevaluate = r => require.ensure([], () => r(require('../page/evaluate/chaseevaluate')), 'chaseevaluate');
const delevaluate = r => require.ensure([], () => r(require('../page/evaluate/delevaluate')), 'delevaluate');


export default [{
  path: '/',
  component: App, //顶层路由，对应index.html
  children: [ //二级路由，对应App.vue
    //地址为空时，跳转登录页面
    {
      path: '',
      redirect: '/login'
    },
    {
      path: '/login',
      component: login,
      meta: {
        title: '登录'
      }
    },
    {
      path: '/wxlogin',
      component: wxlogin,
      meta: {
        title: '手机号绑定'
      }
    },
    {
      path: '/forget',
      component: forget,
      meta: {
        title: '忘记密码'
      }
    },
    {
      path: '/regist',
      component: regist,
      meta: {
        title: '注册'
      }
    },
    {
      path: '/protocol',
      component: protocol,
      meta: {
        title: '用户协议'
      }
    },
    {
      path: '/index',
      component: index,
      meta: {
        title: '我的'
      },
      children: [
        {
          path: "/recruitlist",
          component: recruitlist,
          name: "招工",
          meta: {
            title: '招工'
          }
        },
        {
          path: '/salary',
          component: salary,
          name: "工资",
          meta: {
            title: '工资'
          }
        },
        {
          path: '/entry',
          component: entry,
          name: "入职",
          meta: {
            title: '入职'
          }
        },
        {
          path: '/mine',
          component: mine,
          name: "我的",
          meta: {
            title: '我的'
          }
        },
        {
          path: '',
          redirect: '/mine'
        },
      ]
    },
    {
      path: "/material",
      component: material,
      meta: {
        title: '个人资料'
      }
    },
    {
      path: "/account",
      component: account,
      meta: {
        title: '账号管理'
      }
    },
    {
      path: "/modifypwd",
      component: modifypwd,
      meta: {
        title: '密码修改'
      }
    },
    {
      path: "/modifyPhone",
      component: modifyPhone,
      meta: {
        title: '绑定新手机号'
      }
    },
    {
      path: "/secret",
      component: secret,
      meta: {
        title: '密保设置'
      }
    },
    {
      path: "/bucket",
      component: bucket,
      meta: {
        title: '手机号验证'
      }
    },
    {
      path: "/award",
      component: award,
      meta: {
        title: '邀请奖励'
      }
    },
    {
      path: "/awarddetail",
      component: awarddetail,
      meta: {
        title: '邀请入职奖励详情'
      }
    },
    {
      path: "/reward",
      component: reward,
      meta: {
        title: '邀请奖励'
      }
    },
    {
      path: "/rewardentry",
      component: rewardentry,
      meta: {
        title: '邀请入职奖励'
      }
    },
    {
      path: "/rewardregist",
      component: rewardregist,
      meta: {
        title: '邀请注册奖励'
      }
    },
    {
      path: "/service",
      component: service,
      meta: {
        title: '我的客服'
      }
    },
    {
      path: "/problem",
      component: problem,
      meta: {
        title: '常见问题'
      }
    },
    {
      path: "/system",
      component: system,
      meta: {
        title: '消息中心'
      }
    },
    {
      path: '/other',
      component: other,
      meta: {
        title: '消息中心'
      }
    },
    {
      path: '/infodetail',
      component: infodetail,
      meta: {
        title: '消息详情'
      }
    },
    {
      path: "/sign",
      component: sign,
      meta: {
        title: '签到'
      }
    },
    {
      path: "/activitypage",
      component: activitypage,
      meta: {
        title: '活动中心'
      }
    },
    {
      path: "/activity",
      component: activity,
      meta: {
        title: '活动详情'
      }
    },
    {
      path: "/daymoney",
      component: daymoney,
      meta: {
        title: '驻厂管理'
      }
    },
    {
      path: "/eligibleapply",
      component: eligibleapply,
      meta: {
        title: '提前领工资'
      }
    },
    {
      path: "/eligiblesucess",
      component: eligiblesucess,
      meta: {
        title: '提前领工资'
      }
    },
    {
      path: "/staffmanage",
      component: staffmanage,
      meta: {
        title: '在职员工管理'
      }
    },
    {
      path: "/staffrecord",
      component: staffrecord,
      meta: {
        title: '员工录入'
      }
    },
    {
      path: "/residentcheck",
      component: residentcheck,
      meta: {
        title: '资格审核'
      }
    },
    {
      path: "/refuse",
      component: refuse,
      meta: {
        title: '审核拒绝'
      }
    },
    {
      path: "/attendance",
      component: attendance,
      meta: {
        title: '员工考勤'
      }
    },
    {
      path: "/interview",
      component: interview,
      meta: {
        title: '面试预约列表'
      }
    },
    {
      path: "/recruitdetail",
      component: recruitdetail,
      meta: {
        title: '招聘详情'
      }
    },
    {
      path: "/referral",
      component: referral,
      meta: {
        title: '推荐分享'
      }
    },
    {
      path: "/searchwork",
      component: searchwork,
      meta: {
        title: '企业搜索'
      }
    },
    {
      path: "/city",
      component: city,
      meta: {
        title: '城市筛选'
      }
    },
    {
      path: "/citytree",
      component: citytree,
      meta: {
        title: '地址选择'
      }
    },
    {
      path: "/citytreelist",
      component: citytreelist,
      meta: {
        title: '地址选择'
      }
    },
    {
      path: '/paycard_manage',
      component: paycard_manage,
      meta: {
        title: '工资卡管理'
      }
    },
    {
      path: '/dimission',
      component: dimission,
      meta: {
        title: '离职通知'
      }
    },
    {
      path: '/deposit',
      component: deposit,
      meta: {
        title: '提现'
      }
    },
    {
      path: '/deposit_suc',
      component: deposit_suc,
      meta: {
        title: '提现'
      }
    },
    {
      path: '/addcard',
      component: addcard,
      meta: {
        title: '添加工资卡'
      }
    },
    {
      path: '/bindcard',
      component: bindcard,
      meta: {
        title: '工资卡绑定'
      }
    },
    {
      path: '/identityWrite',
      component: bindcard_idtywrite,
      meta: {
        title: '工资卡绑定'
      }
    },
    {
      path: '/cardScan',
      component: bindcard_cardscan,
      meta: {
        title: '工资卡绑定'
      }
    },
    {
      path: '/cardWrite',
      component: bindcard_cardwrite,
      meta: {
        title: '工资卡绑定'
      }
    },
    {
      path: '/setPwd',
      component: bandcrad_setpwd,
      meta: {
        title: '工资卡绑定'
      }
    },
    {
      path: '/changecard',
      component: changecard,
      meta: {
        title: '工资卡信息'
      }
    },
    {
      path: '/changecard_cardscan',
      component: changecard_cardscan,
      meta: {
        title: '工资卡换绑'
      }
    },
    {
      path: '/changecard_cardwrite',
      component: changecard_cardwrite,
      meta: {
        title: '工资卡换绑'
      }
    },
    {
      path: '/success',
      component: success,
      meta: {
        title: '工资卡绑定'
      }
    },
    {
      path: '/change_success',
      component: change_success,
      meta: {
        title: '工资卡换绑'
      }
    },
    {
      path: '/identityauth',
      component: identityauth,
      meta: {
        title: '身份验证'
      }
    },
    {
      path: '/identywrite_asce',
      component: identywrite_asce,
      meta: {
        title: '工资卡绑定'
      }
    },
    {
      path: '/cardscan_asce',
      component: cardscan_asce,
      meta: {
        title: '工资卡绑定'
      }
    },
    {
      path: '/cardwrite_asce',
      component: cardwrite_asce,
      meta: {
        title: '工资卡绑定'
      }
    },
    {
      path: '/setpwd_asce',
      component: setpwd_asce,
      meta: {
        title: '工资卡绑定'
      }
    },
    {
      path: '/authcode',
      component: authcode,
      meta: {
        title: '修改提现密码'
      }
    },
    {
      path: '/withdraw_pwd',
      component: withdraw_pwd,
      meta: {
        title: '修改提现密码'
      }
    },
    {
      path: '/withdraw_pwdupdate',
      component: withdraw_pwdupdate,
      meta: {
        title: '修改提现密码'
      }
    },
    {
      path: '/withdraw_pwdupsucc',
      component: withdraw_pwdupsucc,
      meta: {
        title: '修改提现密码'
      }
    },
    {
      path: '/invite',
      component: invite,
      meta: {
        title: '邀请二维码'
      }
    },
    {
      path: '/bill',
      component: bill,
      meta: {
        title: '个人账单'
      }
    },
    {
      path: '/otherdetail',
      component: otherdetail,
      meta: {
        title: '账单详情'
      }
    },
    {
      path: '/billdetail',
      component: billdetail,
      meta: {
        title: '账单详情'
      }
    },
    {
      path: '/lend',
      component: lend,
      meta: {
        title: '借支'
      }
    },
    {
      path: '/lendDetail',
      component: lendDetail,
      meta: {
        title: '借支详情'
      }
    },
    {
      path: '/company',
      component: company,
      meta: {
        title: '企业点评'
      }
    },
    {
      path: '/citylist',
      component: citylist,
      meta: {
        title: '城市筛选'
      }
    },
    {
      path: '/mechanism',
      component: mechanism,
      meta: {
        title: '企业点评详情'
      }
    },
    {
      path: '/payroll',
      component: payroll,
      meta: {
        title: '晒工资'
      }
    },
    {
      path: '/remark',
      component: remark,
      meta: {
        title: '写点评'
      }
    },
    {
      path: '/wage',
      component: wage,
      meta: {
        title: '工资领取'
      }
    },
    {
      path: '/wageDetail',
      component: wageDetail,
      meta: {
        title: '工资领取'
      }
    },
    {
      path: '/lucky',
      component: lottery,
      meta: {
        title: '幸运积分'
      }
    },
    {
      path: '/luckywheel',
      component: luckywheel,
      meta: {
        title: '幸运积分'
      }
    },
    {
      path: '/luckyball',
      component: luckyball,
      meta: {
        title: '幸运积分'
      }
    },
    {
      path: '/luckyballdraw',
      component: luckyballdraw,
      meta: {
        title: '抽奖记录'
      }
    },
    {
      path: '/luckyballlottery',
      component: luckyballlottery,
      meta: {
        title: '历史开奖'
      }
    },
    {
      path: '/luckyballuser',
      component: luckyballuser,
      meta: {
        title: '幸运用户'
      }
    },
    {
      path: "/scoreexplain",
      component: scoreexplain,
      meta: {
        title: '积分说明'
      }
    },
    {
      path: "/sufferexplain",
      component: sufferexplain,
      meta: {
        title: '经验值说明'
      }
    },
    {
      path: "/entryevaluate",
      component: entryevaluate,
      meta: {
        title: '入职评价'
      }
    },
    {
      path: "/entryevaluateedit",
      component: entryevaluateedit,
      meta: {
        title: '我的入职评价'
      }
    },
    {
      path: "/chaseevaluate",
      component: chaseevaluate,
      meta: {
        title: '追加评价'
      }
    },
    {
      path: "/delevaluate",
      component: delevaluate,
      meta: {
        title: '我的入职评价'
      }
    },
    {
      path: '/*',
      component: error,
      meta: {
        title: '404页面'
      }
    },
  ]
}]

